/***************************************************************
*  Copyright (c) 2007 by GroupMe! Team (www.groupme.net)
*  All rights reserved.
*
*  This file is part of the GroupMe! Project. Source code of 
*  this project is closed and redistribution of this code is
*  prohibited. 
*  
*  Contact: http://www.groupme.net
*
*  This copyright notice MUST APPEAR in all copies of the file!
***************************************************************/
package net.groupme.controller.model;

import java.util.Collection;

/**
 * created on 26/06/2007
 * 
 * A special {@link SearchResult} which embodies images.
 * 
 * @author Fabian Abel, <a href="mailto:abel@l3s.de">abel@l3s.de</a>
 * @author last edited by: $Author: fabian $
 * 
 * @version $Revision: 1.5 $ $Date: 2007-07-12 12:29:43 $
 */
public class ImageSearchResult extends SearchResult {

	/** URL pointing to the thumbnail of this image */
	private String urlOfThumbnail = null;
	private Collection flickrTags = null;
	private String dateCreated = null;
	private String publisher = null;
	private String owner = null;
	private float geoDataLongitude = 0;
	private float geoDataLatitude = 0;
	/**
	 * Creates a new empty ImageSearchResult instance. 
	 */
	public ImageSearchResult() {
		super();
	}
	/**
	 * Creates a new ImageSearchResult instance with the given parameters.
	 */
	public ImageSearchResult(String resultID, String name, String url, String description, String type) {
		super(resultID, name, url, description, type);
	}
	
	
	/**
	 * Creates a new ImageSearchResult instance which has the given attributes.
	 */
	public ImageSearchResult(String urlOfThumbnail, Collection flickrTags, String dateCreated, String publisher, String owner, float geoDataLongitude, float geoDataLatitude) {
		super();
		this.urlOfThumbnail = urlOfThumbnail;
		this.flickrTags = flickrTags;
		this.dateCreated = dateCreated;
		this.publisher = publisher;
		this.owner = owner;
		this.geoDataLongitude = geoDataLongitude;
		this.geoDataLatitude = geoDataLatitude;
	}
	/**
	 * This method returns the urlOfThumbnail of a ImageSearchResult object.
	 * @return the urlOfThumbnail
	 */
	public String getUrlOfThumbnail() {
		return urlOfThumbnail;
	}
	/**
	 * This method returns the Tags from Flicker of a ImageSearchResult object.
	 * @return the urlOfThumbnail
	 */
	public Collection getFlickrTags(){
		return flickrTags;
	}
	/**
	 * This method returns the Creation Date at Flicker of a ImageSearchResult object.
	 * @return the urlOfThumbnail
	 */
	public String getDateCreated(){
		return dateCreated;
	}
	/**
	 * This method returns the Owner at Flicker of a ImageSearchResult object.
	 * @return the urlOfThumbnail
	 */
	public String getOwner(){
		return owner;
	}
	/**
	 * This method returns the Longitude of the Position where the Image of a ImageSearchResult object was taken.
	 * @return the urlOfThumbnail
	 */
	public float getGeoDataLongitude(){
		return geoDataLongitude;
	}
	/**
	* This method returns the Latitude of the Position where the Image of a ImageSearchResult object was taken.
	 * @return the urlOfThumbnail
	 */
	public float getGeoDataLatitude(){
		return geoDataLatitude;
	}
	
	/**
	 * This method sets the urlOfThumbnail of a ImageSearchResult object.
	 * @param urlOfThumbnail the urlOfThumbnail to set
	 */
	public void setUrlOfThumbnail(String urlOfThumbnail) {
		this.urlOfThumbnail = urlOfThumbnail;
	}
	
	public void setFlickrTags(Collection tags){
		this.flickrTags = tags;
	}
	/**
	 * This method returns the Creation Date at Flicker of a ImageSearchResult object.
	 * @return the urlOfThumbnail
	 */
	public void setDateCreated(String date){
		this.dateCreated = date;
	}
	/**
	 * This method returns the Owner at Flicker of a ImageSearchResult object.
	 * @return the urlOfThumbnail
	 */
	public void setOwner(String owner){
		this.owner = owner;
	}
	/**
	 * This method returns the Longitude of the Position where the Image of a ImageSearchResult object was taken.
	 * @return the urlOfThumbnail
	 */
	public void setGeoDataLongitude(float longitude){
		this.geoDataLongitude = longitude;
	}
	/**
	* This method returns the Latitude of the Position where the Image of a ImageSearchResult object was taken.
	 * @return the urlOfThumbnail
	 */
	public void setGeoDataLatitude(float latidude){
		this.geoDataLatitude = latidude; 
	}
	

	/* (non-Javadoc)
	 * @see net.groupme.controller.model.SearchResult#toString()
	 */
	@Override
	public String toString() {
		return super.toString() + "\nThumbnail: " + urlOfThumbnail;
	}
	/**
	 * This method returns the publisher of a ImageSearchResult object.
	 * @return the publisher
	 */
	public String getPublisher() {
		return publisher;
	}
	/**
	 * This method sets the publisher of a ImageSearchResult object.
	 * @param publisher the publisher to set
	 */
	public void setPublisher(String publisher) {
		this.publisher = publisher;
	}
}
